import 'package:args/args.dart';
import 'package:dio/dio.dart';

ArgResults argResults;

void main(List<String> arguments) async {
  var rep = await dioT();
  var parser = ArgParser();
  parser.addFlag('line-number', help: rep.data.toString());
  parser.addOption('mode', callback: (mode) => print('Got mode $mode'));
  parser.addFlag('verbose', callback: (verbose) {
    if (verbose) print('Verbose');
  });
  var results = parser.parse(['--mode', 'debug', 'something', 'else']);
  print(results['mode']); // debug
  print(parser.usage); // true
}

Future<Response> dioT() async {
  var path = 'http://192.168.5.5:8080/app_store_api/jwt';
  var query = {
    'issId': 'd404cae3-cf5b-45f3-bd83-b8559ba2b8d4',
    'keyId': 'M24UJ5Z62W',
  };
  var rep = await Dio().get(path, queryParameters: query);
  return Future.value(rep);
}
